package com.course;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

/**
 * @author: Durian
 * @date: 2021/4/17 14:09
 */
@Slf4j
@MapperScan("com.course.server.mapper")
@SpringBootApplication
@EnableEurekaClient
public class SystemApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(SystemApplication.class, args);
        Environment env = run.getEnvironment();
        log.info("============system 启动完成============");
        log.info("system 地址: \thttp://127.0.0.1:{}", env.getProperty("server.port"));
    }
}
